package io.chenglicun.modules.clc.service.dataset.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.chenglicun.common.service.impl.CrudServiceImpl;
import io.chenglicun.common.constant.Constant;
import io.chenglicun.common.utils.ConvertUtils;
import io.chenglicun.common.utils.Result;
import io.chenglicun.modules.clc.dao.dataset.ClcDataSetColumnDao;
import io.chenglicun.modules.clc.dto.dataset.ClcDataSetColumnDTO;
import io.chenglicun.modules.clc.entity.dataset.ClcDataSetColumnEntity;
import io.chenglicun.modules.clc.service.dataset.ClcDataSetColumnService;
import io.chenglicun.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * 数据集字段配置
 *
 * @author HFHQ 1986866856@qq.com
 * @since 1.0 2024-02-26
 */
@Service
public class ClcDataSetColumnServiceImpl extends CrudServiceImpl<ClcDataSetColumnDao, ClcDataSetColumnEntity, ClcDataSetColumnDTO> implements ClcDataSetColumnService {

    @Override
    public QueryWrapper<ClcDataSetColumnEntity> getWrapper(Map<String, Object> params) {
        QueryWrapper<ClcDataSetColumnEntity> wrapper = new QueryWrapper<>();
        if (params.get("setid") != null && StringUtils.isNotEmpty(params.get("setid").toString()))
            wrapper.lambda().eq(ClcDataSetColumnEntity::getDataSetId, params.get("setid"));

        return wrapper;
    }

}